package com.xinghai.system.domain.entity;

import com.xinghai.system.domain.QdUser;

/**
 * @author SuMingYu
 */
public class LoginResponse {

    private String userId;//用户id
    private String avatar;//头像
    private String phone;//手机号
    private String nickname;//名称
    private String tokenValue;//token
    public LoginResponse() {}

    public LoginResponse(String userId, String avatar, String phone, String nickname, String tokenValue) {
        this.userId = userId;
        this.avatar = avatar;
        this.phone = phone;
        this.nickname = nickname;
        this.tokenValue = tokenValue;
    }

    public LoginResponse(QdUser user, String tokenValue) {
        this.userId = String.valueOf(user.getId());
        this.avatar = "https://img1.baidu.com/it/u=3200425930,2413475553&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800";
        this.phone = user.getUserPhone();
        this.nickname = user.getNickName();
        this.tokenValue = tokenValue;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getTokenValue() {
        return tokenValue;
    }

    public void setTokenValue(String tokenValue) {
        this.tokenValue = tokenValue;
    }
}
